// 标签管理页面样式
@use '../variables' as *;
.tag-list {
    // 示例数据提示样式
    .sample-data-notice {
        margin-bottom: 16px;
        .el-alert__title {
            font-weight: 600;
        }
        .el-alert__description {
            font-size: 14px;
            line-height: 1.5;
        }
    }
    .action-section {
        background: white;
        border-radius: $radius-lg;
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: $shadow-md;
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            h2 {
                margin: 0;
                font-size: 1.5rem;
                font-weight: $font-bold;
                color: $text-primary;
            }
            .header-actions {
                display: flex;
                align-items: center;
                gap: 16px;
                .search-box {
                    min-width: 300px;
                     :deep(.el-input__wrapper) {
                        border-radius: $radius-md;
                        background-color: #f8f9fa;
                        border: 1px solid #e1e5e9;
                        transition: all 0.3s ease;
                        &:hover {
                            border-color: #c0c4cc;
                            background-color: #ffffff;
                        }
                        &:focus-within {
                            border-color: #409eff;
                            background-color: #ffffff;
                            box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
                        }
                    }
                     :deep(.el-input__inner) {
                        color: $text-primary;
                        font-size: 14px;
                        &::placeholder {
                            color: #909399;
                        }
                    }
                }
            }
        }
    }
    .tags-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
        margin-bottom: 24px;
        @media (max-width: 768px) {
            grid-template-columns: 1fr;
            gap: 16px;
        }
    }
    .tag-card {
        background: white;
        border-radius: $radius-lg;
        padding: 20px;
        box-shadow: $shadow-md;
        transition: all $transition-normal;
        border: 1px solid $border-light;
        &:hover {
            transform: translateY(-2px);
            box-shadow: $shadow-lg;
            border-color: #667eea;
        }
        .tag-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 16px;
            .tag-color {
                width: 40px;
                height: 40px;
                border-radius: 50%;
                border: 3px solid white;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            }
            .tag-actions {
                display: flex;
                gap: 8px;
                opacity: 0;
                transition: opacity $transition-normal;
                .el-button {
                    display: inline-flex;
                    align-items: center;
                    gap: 4px;
                    height: 32px;
                    padding: 0 12px;
                    font-size: 12px;
                    border-radius: 6px;
                    transition: all $transition-normal;
                    &:hover {
                        transform: translateY(-1px);
                        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
                    }
                    .el-icon {
                        font-size: 14px;
                    }
                }
                .el-dropdown {
                    .el-button {
                        .el-icon--right {
                            margin-left: 2px;
                        }
                    }
                }
            }
        }
        &:hover .tag-actions {
            opacity: 1;
        }
        .tag-content {
            .tag-name {
                margin: 0 0 8px 0;
                font-size: 1.2rem;
                font-weight: $font-bold;
                color: $text-primary;
            }
            .tag-description {
                margin: 0 0 16px 0;
                font-size: 14px;
                color: $text-secondary;
                line-height: 1.5;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }
            .tag-stats {
                display: flex;
                justify-content: space-between;
                align-items: center;
                font-size: 12px;
                color: $text-secondary;
                .post-count {
                    background: rgba(102, 126, 234, 0.1);
                    color: #667eea;
                    padding: 4px 8px;
                    border-radius: 12px;
                    font-weight: $font-medium;
                }
                .create-time {
                    color: $text-secondary;
                }
            }
        }
    }
    // 对话框样式
     :deep(.el-dialog) {
        .el-dialog__header {
            border-bottom: 1px solid $border-light;
            padding: 20px 24px 16px;
            .el-dialog__title {
                font-weight: $font-bold;
                color: $text-primary;
            }
        }
        .el-dialog__body {
            padding: 24px;
        }
        .el-dialog__footer {
            border-top: 1px solid $border-light;
            padding: 16px 24px 20px;
            .dialog-footer {
                display: flex;
                justify-content: flex-end;
                gap: 12px;
            }
        }
    }
    // 表单样式
     :deep(.el-form) {
        .el-form-item {
            margin-bottom: 20px;
            .el-form-item__label {
                font-weight: $font-medium;
                color: $text-primary;
            }
            .el-input__wrapper,
            .el-textarea__inner {
                border-radius: $radius-md;
                border: 1px solid $border-light;
                transition: all $transition-normal;
                &:hover {
                    border-color: #667eea;
                }
                &.is-focus {
                    border-color: #667eea;
                    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
                }
            }
        }
    }
    // 颜色选择器样式
     :deep(.el-color-picker) {
        .el-color-picker__trigger {
            border-radius: $radius-md;
            border: 1px solid $border-light;
            transition: all $transition-normal;
            &:hover {
                border-color: #667eea;
            }
        }
    }
}

// 响应式设计
@media (max-width: 768px) {
    .tag-list {
        .action-section {
            .section-header {
                flex-direction: column;
                gap: 16px;
                align-items: stretch;
                h2 {
                    text-align: center;
                }
            }
        }
        .tag-card {
            .tag-header {
                .tag-actions {
                    opacity: 1;
                }
            }
        }
    }
}